import type { AxiosRequestConfig, AxiosResponse } from 'axios'

export interface FTRequestInterceptors<T = AxiosResponse> {
  requestInterceptor?: (config: AxiosRequestConfig) => AxiosRequestConfig
  requestInterceptorCatch?: (error: any) => any
  responseInterceptor?: (res: T) => T
  responseInterceptorCatch?: (error: any) => any
}
//默认配置类AxiosRequestConfig没有拦截器对象，所以自己实现
export interface FTRequestConfig<T = AxiosResponse> extends AxiosRequestConfig {
  interceptors?: FTRequestInterceptors<T>
  showLoading?: boolean
}
